<template>
  <div>
    <Type-Nav />
    <!--列表-->
    <ListContainer />
    <!--今日推荐-->
    <TodayRecommend />
    <!-- 商品排行 -->
    <Rank />
    <!-- 猜你喜欢 -->
    <Like />
    <!--楼层-->
    <Floor
      v-for="floor in floorsList"
      :key="floor.id"
      :floor="floor"
      :cname="'floor-swiper' + floor.id"
    />
    <!--商标-->
    <Brand />
  </div>
</template>

<script>
import TypeNav from "@/components/TypeNav/index.vue";
import Brand from "./Brand/Brand";
import Floor from "./Floor/Floor";
import Like from "./Like/Like";
import ListContainer from "./ListContainer/ListContainer";
import Rank from "./Rank/Rank";
import TodayRecommend from "./TodayRecommend/TodayRecommend";

import { mapState } from "vuex";

export default {
  name: "Home",
  components: {
    TypeNav,
    Brand,
    Floor,
    Like,
    ListContainer,
    Rank,
    TodayRecommend,
  },

  computed: {
    ...mapState("home", ["floorsList"]),
  },
  mounted() {
    this.$store.dispatch("home/getFloorsData");
  },
};
</script>

<style lang="less" scoped>
</style>